/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */



package bdControlador;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 *
 * @author humberto
 */
public class BdControlador
{

    public BdControlador() {
    }

    public static Connection establecerConexion() throws ClassNotFoundException, SQLException
    {
        Connection conexion=null;

        Class.forName("com.mysql.jdbc.Driver");
        conexion = (Connection) DriverManager.getConnection("jdbc:mysql://localhost/fullAgricola","root","");

        return conexion;
    }
    
    public static void liberarConexion(Connection conexion) throws SQLException{
        // Se libera la conexión con la base de datos. 
        conexion.close();
    }
    
}







